<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateProductTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('product', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('product_number')->nullable()->comment('产品编码');
            $table->string('product_name')->nullable()->comment('产品名称');
            $table->string('customer_number')->nullable()->comment('客户编码');
            $table->string('product_type')->nullable()->comment('产品分类');
            $table->string('type')->nullable()->comment('类别');
            $table->string('product_line')->nullable()->comment('产品线');
            $table->string('price')->nullable()->comment('售价');
            $table->string('pattern')->nullable()->comment('款式');
            $table->string('research_dept')->nullable()->comment('研发部门');
            $table->string('research_person')->nullable()->comment('研发责任人');
            $table->json('bom')->nullable()->comment('BOM');
            $table->string('raw_material')->nullable()->comment('原料');
            $table->string('raw_material_rate')->nullable()->comment('原料配比');
            $table->string('color')->nullable()->comment('颜色');
            $table->string('matching')->nullable()->comment('配比');
            $table->string('wool_length')->nullable()->comment('毛长');
            $table->string('length')->nullable()->comment('长度');
            $table->string('weight')->nullable()->comment('重量');
            $table->string('master_img')->nullable()->comment('主图');
            $table->json('imgs')->nullable()->comment('图片');
            $table->json('videos')->nullable()->comment('视频');
            $table->string('job_instruction')->nullable()->comment('作业指导书');
            $table->string('trademark')->nullable()->comment('商标');
            $table->json('labels')->nullable()->comment('标签');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('product');
    }
}
